(defun c:xs(/ ent1 ent2 pt1 pt2 ss)
  (setvar "cmdecho" 0)
  (setvar "osmode" 0) 
(setq ss (ssget '((0 . "point"))) 
     ent1 (ssname ss 0)
     pt1 (cdr (assoc 10 (entget ent1)))
	   ent2 (ssname ss 1) 
	   pt2(cdr (assoc 10 (entget ent2))))
	(MK-line3 (list pt1 pt2) 1 "3中心线层")
	(entmake (list '(0 . "line") (cons 10 pt1) (cons 62 2) (cons 11 (polar pt1 (angle pt1 pt2) 1))))
	(entmake (list '(0 . "line") (cons 10 pt2) (cons 62 2) (cons 11 (polar pt2 (angle pt1 pt2) -1))))
    (setvar "osmode" 16383)  
  (princ)
)